package com.hanliy.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author hanyulin
 * @apiNote 获取yaml里面的wx配置
 * @date 2021/12/22 10:48
 */
@ConfigurationProperties(prefix = "wx")
@Component
@Data
public class WxProperties {

    private MiniApp miniApp;

    private Pay pay;

    private Android android;

    private Ios ios;

    @Data
    public static class MiniApp{
        private String appId;
        private String appSecret;
    }

    @Data
    public static class Pay{
        private String mchId;
        private String machSerialNumber;
        private String mchSecret;
        private String cert;
        private String doMain;
    }

    @Data
    public static class Ios{
        private String appId;
        private String appSecret;
    }

    @Data
    public static class Android{
        private String appId;
        private String appSecret;
    }
}
